package com.jwdf.uda.ui.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.View;


/**
 * site :  http://www.andcup.com
 * email:  amos@andcup.com
 * github: https://github.com/andcup
 * Created by Amos on 2016/3/15.
 */
public abstract class BaseViewHolder<T> extends RecyclerView.ViewHolder implements View.OnClickListener{
    protected T item;
    protected View convertView;
    public BaseViewHolder(View convertView) {
        super(convertView);
        this.convertView = convertView;
    }
    public View getConvertView() {
        return convertView;
    }

    protected abstract void onBindView(T item);

    protected void onBindView(T item, int position) {
        this.item = item;
        onBindView(item);
    }

    @Override
    public void onClick(View v) {

    }


}
